From: Jonas Dreßler Date: Tue, 8 Jul 2025 14:58:25 +0000 (+0200) Subject: windowPreview: Replace the click action with a click and long press gesture X-Git-Tag: archive/raspbian/50.5-1+rpi1~1^2~104^2^2~36 X-Git-Url: https://dgit.raspbian.org/%22http://www.example.com/cgi/%22/%22http:/www.example.com/cgi/%22?a=commitdiff_plain;h=97ed0bad2f002b5367bd0598dd27315c92c4e717;p=gnome-shell.git windowPreview: Replace the click action with a click and long press gesture In the porting, temporarily stop integrating the WindowPreview gestures with DnD, this used to be done through addClickAction() but DnD will change to using gestures in later commits, making its porting moot. This integration will be restored later on. Part-of: --- diff --git a/js/ui/windowPreview.js b/js/ui/windowPreview.js index 3bc04187e..6e1593de8 100644 --- a/js/ui/windowPreview.js +++ b/js/ui/windowPreview.js @@ -115,15 +115,13 @@ export const WindowPreview = GObject.registerClass({ this); this.inDrag = false; - let clickAction = new Clutter.ClickAction(); - clickAction.connect('clicked', () => this._activate()); - clickAction.connect('long-press', (action, actor, state) => { - if (state === Clutter.LongPressState.ACTIVATE) - this.showOverlay(true); - return true; - }); + const clickGesture = new Clutter.ClickGesture(); + clickGesture.connect('recognize', () => this._activate()); + this.add_action(clickGesture); - this._draggable.addClickAction(clickAction); + const longPressGesture = new Clutter.LongPressGesture(); + longPressGesture.connect('recognize', () => this.showOverlay(true)); + this.add_action(longPressGesture); this._overlayEnabled = true; this._overlayShown = false;